<?php
/**
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 */
defined ('_JEXEC') or die;
// This is to debug installation script. Need to be removed in production version
/*if (@$_GET['task'] !== 'service') {
	require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'install.agora.php');
	com_install();return;
}*/

if (isset($_REQUEST['agora_task']))
{
	// We need this to handle Joomla buttons like 'remove'
	// They set task option and we have no way to override this (hello Joomla develpers :)
	$_REQUEST['action'] = $_REQUEST['task'];
	$_REQUEST['task'] = $_REQUEST['agora_task'];
}

require_once(JPATH_COMPONENT.DS.'upgrade.php');

if (@$_GET['task'] !== 'service') {
	$up = new AgoraDatabaseUpgrade();
	$up->upgrade();
}

require_once(JPATH_COMPONENT_SITE.DS.'agora.php');

